#include <iostream>
#include <set>

using std::cin;
using std::cout;
using std::set;
using std::string;
using std::endl;

int
matches(string s, set<char> m)
{
    int c = 0;
    
    for (int i = 0; i < s.size(); ++i)
    {
        if (m.find(s[i]) != m.end()) {
            ++c;
        }
    }

    return c;
}

int
main(int argc, char **argv)
{
    string s;

    string longest = "";
    string most_vowels = "";

    set<char> vowels;
    vowels.insert('a');
    vowels.insert('e');
    vowels.insert('i');
    vowels.insert('o');
    vowels.insert('u');

    while (cin >> s)
    {
        if (s.size() > longest.size()) {
            longest = s;
        }

        if (matches(s, vowels) > matches(most_vowels, vowels)) {
            most_vowels = s;
        }
    }

    cout << "longest : " << longest << endl;
    cout << "most vowels : " << most_vowels << endl;
}
